package com.isnmp.nms.framework.discover.rstype;

import com.isnmp.common.snmp.mib.MibDiskAndMemoEntry;
import com.isnmp.nms.framework.discover.ResourceInfo;

public class DisckType extends SNMPTableBasicMothType {
    public DisckType() {
        setResoureTypeName(Messages.getString("DisckType.0"));
    }

    public Class getORMappingClass() {
        return MibDiskAndMemoEntry.class;
    }

    public String getResourceSearchMoth() {
        return Messages.getString("DisckType.1");
    }

    public ResourceInfo tableMibInfoToResouce(Object paramObject) {
        ResourceInfo localResourceInfo = new ResourceInfo();
        MibDiskAndMemoEntry localMibDiskAndMemoEntry = (MibDiskAndMemoEntry) paramObject;
        String str = localMibDiskAndMemoEntry.getHrStorageType();
        if ((str.equalsIgnoreCase("1.3.6.1.2.1.25.2.1.2")) || (str.equalsIgnoreCase("1.3.6.1.2.1.25.2.1.3")))
            return null;
        localResourceInfo.setResourceRSIDValue(localMibDiskAndMemoEntry.getHrStorageIndex() + "");
        localResourceInfo.setResourceName(localMibDiskAndMemoEntry.getHrStorageDescr());
        localResourceInfo.setResourceParam(Messages.getString("DisckType.5") + localMibDiskAndMemoEntry.getHrStorageSize() * localMibDiskAndMemoEntry.getHrStorageAllocationUnits() / 1024L / 1024L);
        localResourceInfo.setResourceDesc(Messages.getString("DisckType.6") + localMibDiskAndMemoEntry.getHrStorageType());
        localResourceInfo.setResrouceRemarks(getTypeDesc());
        return localResourceInfo;
    }
}